-
Notifications
You must be signed in to change notification settings - Fork 26
Conversation
4152f66
to
5b74609
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some notes I had when reading through it
value: flatObj[key] | ||
} | ||
}) | ||
return paths |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can just immediately return the result, instead of creating a variable
continue | ||
} | ||
// Exclude arrays from the final result | ||
if (flatObject[x] && Array === flatObject.constructor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use Array.isArray
d296603
to
4bc69d2
Compare
4bc69d2
to
72db4fd
Compare
"version": "0.6.0", | ||
"description": "JavaScript implementation of the IPLD (InterpPlanetary Linked Data)", | ||
"main": "lib/index.js", | ||
"main": "src/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: remove before merge
'use strict' | ||
|
||
const util = require('./util') | ||
const _times = require('lodash.times') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why _times
?
// out of scope | ||
|
||
// TODO this was my first try at writting this out of scope traversal code, | ||
// it REALLY needs way more testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is :( Doesn't make it incorrect though
const flatObj = flattenObject(node) | ||
const paths = Object.keys(flatObj) | ||
.map((key) => { | ||
return { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is some odd indenation
|
||
describe('node', () => { | ||
describe.skip('resolver.resolve', () => { | ||
it('path', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about tests for these things?
}, { | ||
path: 'array/1', | ||
value: '2' | ||
} */]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be probably fixed before merge?
8ee153c
to
b0e9d41
Compare
b0e9d41
to
0192c56
Compare
0192c56
to
b7a565b
Compare
No description provided.